package hhm.springrmi.test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import hhm.springrmi.remote.MessageProvider;

public class Client {
	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("conf/client.xml");
		System.out.println("加载Spring容器,并初始化RMI客户端");
		MessageProvider client = (MessageProvider) ctx.getBean("messageService");
		String temp = client.queryForMessage("LvSantorini");

		System.out.println("返回结果: " + temp);
	}
}
